package com.topsoft.micro.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.topsoft.micro.service.SendSmsService;

@Controller
public class SmsController {
	
	
	@Autowired
	public  SendSmsService  sendSmsService;
	
	
	@RequestMapping({"/","/send"})
	public   String  sendTest(HttpServletRequest request, HttpServletResponse response, Model model){
		
		String result=sendSmsService.sendMsg();
		
		model.addAttribute("msg", result);
		
		return "index";
	}

}
